package com.example.fuluchou.service.dto;


import com.example.fuluchou.service.enums.ActivityPrizeStatusEnum;
import com.example.fuluchou.service.enums.ActivityPrizeTiersEnum;
import com.example.fuluchou.service.enums.ActivityStatusEnum;
import com.example.fuluchou.service.enums.ActivityUserStatusEnum;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
public class ActivityDetailDTO implements Serializable {
    //活动信息

    /**
     * 活动Id
     */
    private Long activityId;

    /**
     * 活动名称
     */
    private String activityName;

    /**
     * 活动描述
     */
    private String description;

    /**
     * 活动状态
     */
    private ActivityStatusEnum status;

    public Boolean valid() {
        return status.equals(ActivityStatusEnum.RUNNING);
    }

    //关联的奖品信息
    private List<PrizeDTO> prizeDOList;

    //关联的人员信息
    private List<UserDTO> userDOList;

    @Data
    public static class PrizeDTO{
        /**
         * 奖品Id
         */
        private Long prizeId;

        /**
         * 奖品名字
         */
        private String name;

        /**
         * 奖品描述
         */
        private String description;

        /**
         * 奖品价格
         */
        private BigDecimal price;

        /**
         * 奖品索引
         */
        private String imageurl;

        /**
         * 奖品状态
         */
        private ActivityPrizeStatusEnum status;

        /**
         * 奖品等级
         */
        private ActivityPrizeTiersEnum tiers;

        /**
         * 奖品数量
         */
        private Long amount;

        public Boolean valid() {
            return status.equals(ActivityPrizeStatusEnum.INIT);
        }
    }
    @Data
    public static class UserDTO{
        /**
         * UserId
         */
        private Long userId;

        /**
         * 名字
         */
        private String userName;

        /**
         * user状态
         */
        private ActivityUserStatusEnum status;

        public Boolean valid() {
            return status.equals(ActivityUserStatusEnum.INIT);
        }

    }

}
